#include "mt3d_cuda.h"

void mt3d::get_element_conductivity(int tag_num, double &conduct, bool ref_cndt)
{
    for (int i = 0; i < secondary_model_.size(); ++i) // 数量有限直接搜索即可
    {
        if (secondary_model_[i].tag == tag_num)
        {
            if (ref_cndt) conduct = secondary_model_[i].ref_cndt;
            else conduct = secondary_model_[i].cndt;
            return;
        }
    }

    throw gctl::runtime_error("No secondary model found by the tag number: "+std::to_string(tag_num));
    return;
}
